package threading;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: WHY
 * Date: 2023-03-15
 * Time: 21:21
 */
public class ThreadDemo9 {
    public static void main(String[] args) {
        Thread t=new Thread(()->{
            for(int i=0;i<20;i++){
                System.out.println(i);
            }
        });
        t.start();
        try {
            Thread.sleep(20000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("ok");
    }
}
